<template>
  <!-- 新鲜好物 -->
  <div class="tot" >
    <div class="tit" >
      <template>
        <h4>
          {{ title }}<small>{{ total }}</small>
        </h4>
      </template>
      <slot name="title"></slot>
    </div>
    <ul>
      <li v-for="item in xxhw" :key="item.id">
        <img :src="item.picture" alt="" />
        <p class="ti">{{ item.name }}</p>
        <p class="price">
          <i>¥</i>
          {{ item.price }}
        </p>
      </li>
    </ul>
  </div>
</template>

<script>
import '@/utils/constfun'
export default {
  props: ["title", "total", "xxhw"],

};
</script>

<style lang="scss" scoped>
@import "@/assets/css/mixin.scss";
@import "@/assets/css/color.scss";
ul {
  width: 100%;
  display: flex;
  justify-content: space-between;
  li {
    width: 306px;
    height: 406px;
    background: #f0f9f4;
    text-align: center;

    .ti {
      font-size: 22px;
      padding: 12px 30px 0 30px;
      text-align: center;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .price {
      color: #cf4444;
      font-size: 22px;
      padding: 12px 30px 0 30px;
      text-align: center;
    }
  }
  li {
    @include hoverShadow();
  }
}
.tot {
  width: 100%;
  height: 100%;
  .tit {
    width: 100%;
    height: 115px;
    //   background: red;
    display: flex;
    justify-content: space-between;
    align-items: center;
    h4 {
      margin-left: 5px;
      font-size: 32px;
      font-weight: 400;
      small {
        margin-left: 20px;
        font-size: 16px;
        color: #ccc;
      }
    }
    .xtx-more {
      margin-bottom: 2px;
      span {
        font-size: 16px;
        vertical-align: middle;
        margin-right: 4px;
        color: #999;
      }
      i {
        font-size: 14px;
        vertical-align: middle;
        position: relative;
        top: 2px;
        color: #ccc;
      }
      &:hover {
        span,
        i {
          color: $xtxColor;
        }
      }
    }
  }
  .footer {
    width: 100%;
    height: 420px;
  }
}
</style>